<template>
  <div class="global_order marginTop10">
    <div class="main_white padding10 paddingTop0">
      <div class="main_ti">
        <el-form
          :model="baidmap_form"
          :inline="false"
          class="demo-form-inline"
          ref="userListFrom"
          label-width="180px"
        >
          <el-form-item class="flex_center" prop="baidu_distinguis_api_key">
            <span slot="label"> 百度图片识别Api key：</span>
            <el-input
              v-model="baidmap_form.baidu_distinguis_api_key"
              placeholder="百度图片识别api"
            ></el-input>
          </el-form-item>
          <el-form-item class="flex_center" prop="baidu_distinguis_secret_key">
            <span slot="label"> 百度图片识别Secret key：</span>
            <el-input
              v-model="baidmap_form.baidu_distinguis_secret_key"
              placeholder="百度图片识别secret"
            ></el-input>
          </el-form-item>
          <el-form-item class="flex_center" prop="baidu_ak">
            <span slot="label"> 百度地图应用AK： </span>
            <el-input
              v-model="baidmap_form.baidu_ak"
              placeholder="百度地图应用AK"
            ></el-input>
          </el-form-item>
          <el-form-item class="flex_center" prop="baidu_service_id">
            <span slot="label"> 百度鹰眼轨迹ServiceId：</span>
            <el-input
              v-model="baidmap_form.baidu_service_id"
              placeholder="百度鹰眼轨迹ServiceId"
            ></el-input>
          </el-form-item>
          <el-form-item class="flex_center" prop="amap_key">
            <span slot="label"> 高德地图Key：</span>
            <el-input
              v-model="baidmap_form.amap_key"
              placeholder="高德地图Key"
            ></el-input>
          </el-form-item>

          <div class="clearfix"></div>
          <div class="newConBox_p100 paddingBottom10" id="newConBox">
            <div class="newConBox_h32">
              <div>
                <el-button type="primary" @click="preservation" v-repeatClick
                  >保存</el-button
                >
              </div>
            </div>
          </div>
        </el-form>
      </div>
    </div>
  </div>
</template>

<script>
import { setting_info } from "@/api/global/globalSystem";
import { setting_company } from "@/api/currency";
import { apiUrl, objKeySort, Md5 } from "@/utils/public";
export default {
  props: {
    form: {
      type: Object,
      required: true,
    },
  },
  data() {
    return {
      baidmap_form: {
        baidu_ak: "",
        baidu_service_id: "",
        amap_key: "",
        baidu_distinguis_api_key: "",
        baidu_distinguis_secret_key: "",
      },
    };
  },
  watch: {
    form(newval, oldval) {
      this.baidmap_form = newval;
    },
  },
  mounted() {
    this.baidmap_form = this.form;
  },
  created() {},
  methods: {
    preservation() {
      this.$emit("save", { data: this.baidmap_form });
    },
  },
};
</script>

<style lang="scss" scoped>
@import "@/styles/variables.scss";

/deep/.el-input {
  width: 400px;
}
</style>